package xin.mashibo.artcobutest.vo;

import android.os.Parcel;
import android.os.Parcelable;

import com.artc.development.myble.sdk.CardTransactionRecord;

/**
 * @author MaShibo
 *         on 2018/3/26
 */
public class CardTransactionExtend extends CardTransactionRecord implements Parcelable {


    public static final Creator<CardTransactionExtend> CREATOR = new Creator<CardTransactionExtend>() {
        @Override
        public CardTransactionExtend createFromParcel(Parcel in) {
            return new CardTransactionExtend(in);
        }

        @Override
        public CardTransactionExtend[] newArray(int size) {
            return new CardTransactionExtend[size];
        }
    };

    public CardTransactionExtend() {
    }

    public CardTransactionExtend(CardTransactionRecord transaction) {
        onlineSn = transaction.onlineSn;
        overdrawLimit = transaction.overdrawLimit;
        transAmount = transaction.transAmount;
        transType = transaction.transType;
        terminalNo = transaction.terminalNo;
        transDate = transaction.transDate;
        transTime = transaction.transTime;
    }

    protected CardTransactionExtend(Parcel in) {
        onlineSn = in.readString();
        overdrawLimit = in.readString();
        transAmount = in.readString();
        transType = in.readString();
        terminalNo = in.readString();
        transDate = in.readString();
        transTime = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(onlineSn);
        dest.writeString(overdrawLimit);
        dest.writeString(transAmount);
        dest.writeString(transType);
        dest.writeString(terminalNo);
        dest.writeString(transDate);
        dest.writeString(transTime);
    }

    @Override
    public int describeContents() {
        return 0;
    }
}
